<link type="text/css" href="/admins/js/jquery/css/ui-lightness/transa.css" rel="stylesheet" />
<div style=" border:1px solid #DDDDDD; padding:2px; margin:2px;line-height: 36px;" id='sel'> 
      <form action="/admini/transation/list/"  method="get" style="margin:0px" id="form1">
            <label for="quick">&nbsp;&nbsp;快速搜索：</label><input type="text" id="quick" name="quick" value="<?php echo $this->quick; ?>" />
            <input type="submit" id="queryButton" name="queryButton" class="button" value="查询"/>
      </form>
</div>



<div class="dataTable">
      <table>         
            <tfoot>
                  <tr>
                        <td></td>
                        <td></td>
                        <td align="center">
                              <?php
                              if ($this->ma == 2) {
                                    echo "<input class='button' id='list-button' type='button' value='打印' />";
                              } else if ($this->ma == 1) {
                                    echo " <input class='button' id='del-button' type='button' value='打印' />";
                              } else if ($this->ma == 0) {
                                    echo " <input class='button' id='con-button' type='button' value='打印' />";
                              }
                              ?>
                        </td>
                        <td></td>
                  </tr>
            </tfoot>
            <tr>

                  <th class="w1" width="25% " ></th>
                  <th class="w2" width="25%" align="center">订单号</th>
                  <th class="w3" width="25%" align="center">公司名称</th>          
                  <th class="w4" width="25%" align="center"></th>
            </tr>  

            <?php
            if ($this->trackList) {
                  foreach ($this->trackList as $Item) {
                        ?>
                        <tr>                             
                              <td class="w1" align="center"><?php echo $Item->id; ?></td>
                              <td class="w2" align="center"><?php echo $Item->num; ?></a></td>
                              <td class="w3" align="center"><?php echo $Item->ShipType->name; ?></td>
                              <td class="w4" align="center"><?php echo $Item->TransaDate->datetime; ?></td>
                        </tr>
                        <?php
                  }
            }
            ?>
      </table>
</div>                
<div class="toolbar">
      <?php echo $this->partial('paging.phtml', array("pages" => $this->trackAll, "pamas" => "quick=" . $this->quick)); ?>
</div>
<?php
if (isset($this->message) && $this->message != "") {
      echo '<script language="javascript" type="text/javascript">alert("' . $this->message . '")</script>';
}
?>
<script language="javascript">

      $('#del-button').click(function() {
            var con = "<?php echo $Item->listId; ?>";
            location.href = '/admini/transation/print?name=' + con;
      });
      $('#list-button').click(function() {
            location.href = '/admini/transation/print/';
      });
      $('#con-button').click(function() {
            var con = "<?php echo $Item->id; ?>";
            location.href = '/admini/transation/print?id=' + con;
      });
</script>

